{% comment %}
/* Copyright 2009 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
{% endcomment %}
{% extends 'base.html' %}
{% block content %}

<div id="cc-act">
  {% if user %}
  {{user.gia.email}} |
  {% if is_admin %}
  <a href="/admin/post">Admin</a> |
  {% endif %}
  <a href="{{logout_url}}">Logout</a>
  {% else %}
  <a href="{{login_url}}">Login</a>
  {% endif %}
</div>

<div>
  <a href="/">
  {% if blog.logo_path %}
  <img src="/images/{{blog.logo_path}}">
  {% else %}
  {{blog.name|title}}
  {% endif %}
  </a>
  <div>{{blog.tagline}}</div>
</div>

<ul>
  <li><a href="/">{{blog.button_name}}</a></li>
  {% for page in published_pages %}
  <li><a href="/{{page.path}}">{{page.button_name}}</a></li>
  {% endfor %}
</ul>

{% if page %}
  <div id="cc-page-title">{{page.title}}</div>
  <div>
    By {{page.author.nickname}} On {{page.publish_date|date:"Y/m/d"}}
  </div>
  <div id="cc-page-body">{{page.body}}</div>
  {% if page.updated_by %}
  <div id='cc-page-foot'>
    Edited By {{page.updated_by.nickname}} On {{page.edit_date|date:"Y/m/d"}}
  </div>
  {% endif %}
{% else %}

{% comment %}
404 text goes here. If you'd like a default 404 for all 404s, then you can create a new template file and include that here.
{% endcomment %}

Sorry, couldn't find the page you requested. Check the requested url for proper
speleling.

{% endif %}


{% if blog_links %}
<ul>
{% for link in blog_links %}
  <li>
    <a href="{{link.url}}" {% if link.nofollow %} rel="nofollow"{% endif %}>
      {{link.anchor}}
    </a>
  </li>
{% endfor %}
</ul>
{% endif %}

{% endblock %}